all: ex1_server sc

clean:
	rm ex1_server mStackServer.o sc mStackClient.o mstack.o mutex.o

ex1_server: mStackServer.o mstack.o
	g++ -o ex1_server mStackServer.o mstack.o mutex.o -lpthread -ltbb

mStackServer.o: mStackServer.cpp
	g++ -Wall -lpthread -ltbb -c mStackServer.cpp

mstack.o: mutex.o
	g++ -Wall -lpthread -ltbb -c Libs/mstack.cpp

mutex.o:
	g++ -Wall -lpthread -ltbb -c Libs/mutex.cpp

sc: mStackClient.o
	g++ -o sc mStackClient.o -lpthread

mStackClient.o: mStackClient.cpp
	g++ -Wall -lpthread -ltbb -c mStackClient.cpp
